#include <stdio.h>
#include "vectors.h"



vector VectorAdd(vector *v1, vector *v2){
	
	vector product;
	
	product.x = v1->x + v2->x;
	product.y = v1->y + v2->y;
	product.z = v1->z + v2->z;

return product;	
}

vector VectorSub(vector *v1, vector *v2){

	vector product;

	product.x = v1->x - v2->x;
	product.y = v1->y - v2->y;
	product.z = v1->z - v2->z;
	
return product;
}

float VectorDot(vector *v1, vector *v2){
	float result;
	
	result = (v1->x*v2->x)+(v1->y*v2->y)+(v1->z*v2->z);

return result;
}

vector VectorScale(float c, vector *v1){
	
	vector product;
	
	product.x = v1->x * c;
	product.y = v1->y * c;
	product.z = v1->z * c;

return product;
}




